#ifndef __Flash_H
#define __Flash_H	 

#include "Sys.h" 

class Flash
{
// Construction
public:
	Flash();
		
// Properties
public:
	u32 m_nError;
	u32 m_nErrorCode;

// Methods
public:
	u8 eraseSector(u8 nBank, u8 nSector);
	u8 write8Word(u32* faddr, u32* pdata);
	u8 getErrorStatus(u8 bankx);
	u8 waitDone(u8 bankx,u32 time);

private:
	void lock();
	void unlock();

// Overwrite
public:
};
#endif
